package dto

import ()

// RegisterUserReq 注册用户请求
// @Description 用户注册请求参数
// @Tags User
// @Accept json
// @Produce json
type RegisterUserReq struct {
	ID               int64            `json:"ID,omitempty" proto:"Id" validate:"omitempty,gt=0"`
	Name             string           `json:"name,omitempty" proto:"Name" validate:"required,min=3,max=50"`
	NickName         string           `json:"nickName,omitempty" proto:"NickName" validate:"omitempty,min=1,max=100"`
	Password         string           `json:"password,omitempty" proto:"Password" validate:"required,min=6,max=100"`
	Email            string           `json:"email,omitempty" proto:"Email" validate:"omitempty,email"`
	CountryCode      int64            `json:"countryCode,omitempty" proto:"CountryCode" validate:"omitempty,gt=0"` // CountryCode 标识电话号码所在国家
	Phone            int64            `json:"phone,omitempty" proto:"Phone" validate:"omitempty,gt=1000000000"`    // Phone 电话号码
	Sex              int64            `json:"sex,omitempty" proto:"Sex" validate:"omitempty,oneof=1 2 3"`          // 1:男, 2:女, 3:未知
	Tags             map[string]int64 `json:"tags,omitempty" proto:"Tags"`
	Status           int64            `json:"status,omitempty" proto:"Status" validate:"omitempty,oneof=101 102 103"` // 101:活跃, 102:禁用, 103:暂停
	VipStatus        int64            `json:"vip_status,omitempty" proto:"VipStatus" validate:"omitempty,oneof=880 881 882 883"` // VIP状态
	VerificationCode string           `json:"verificationCode,omitempty" validate:"omitempty,min=4,max=6"`
}

// CreateUserReq 创建用户请求
// @Description 创建用户请求参数
// @Tags User
// @Accept json
// @Produce json
type CreateUserReq struct {
	Name         string           `json:"name" proto:"Name" validate:"required,min=3,max=50"`
	NickName     string           `json:"nickName,omitempty" proto:"NickName" validate:"omitempty,min=1,max=100"`
	Password     string           `json:"password,omitempty" proto:"Password" validate:"omitempty,min=6,max=100"`
	Email        string           `json:"email,omitempty" proto:"Email" validate:"omitempty,email"`
	CountryCode  int64            `json:"countryCode,omitempty" proto:"CountryCode" validate:"omitempty,gt=0"`
	Phone        int64            `json:"phone,omitempty" proto:"Phone" validate:"omitempty,gt=1000000000"`
	Sex          int64            `json:"sex,omitempty" proto:"Sex" validate:"omitempty,oneof=1 2 3"`
	Avatar       int64            `json:"avatar,omitempty" proto:"Avatar" validate:"omitempty,gt=0"`
	Tags         map[string]int64 `json:"tags,omitempty" proto:"Tags"`
	Status       int64            `json:"status,omitempty" proto:"Status" validate:"omitempty,oneof=101 102 103"`
	VipStatus    int64            `json:"vipStatus,omitempty" proto:"VipStatus" validate:"omitempty,oneof=880 881 882 883"`
	LastIP       string           `json:"lastIP,omitempty" proto:"LastIP" validate:"omitempty,ip"`
}

// UpdateUserReq 更新用户请求
// @Description 更新用户请求参数
// @Tags User
// @Accept json
// @Produce json
type UpdateUserReq struct {
	ID           int64            `json:"id" proto:"Id" validate:"required,gt=0"`
	NickName     string           `json:"nickName,omitempty" proto:"NickName" validate:"omitempty,min=1,max=100"`
	Email        string           `json:"email,omitempty" proto:"Email" validate:"omitempty,email"`
	CountryCode  int64            `json:"countryCode,omitempty" proto:"CountryCode" validate:"omitempty,gt=0"`
	Phone        int64            `json:"phone,omitempty" proto:"Phone" validate:"omitempty,gt=1000000000"`
	Sex          int64            `json:"sex,omitempty" proto:"Sex" validate:"omitempty,oneof=1 2 3"`
	Avatar       int64            `json:"avatar,omitempty" proto:"Avatar" validate:"omitempty,gt=0"`
	Tags         map[string]int64 `json:"tags,omitempty" proto:"Tags"`
	Status       int64            `json:"status,omitempty" proto:"Status" validate:"omitempty,oneof=101 102 103"`
	VipStatus    int64            `json:"vipStatus,omitempty" proto:"VipStatus" validate:"omitempty,oneof=880 881 882 883"`
	LastIP       string           `json:"lastIP,omitempty" proto:"LastIP" validate:"omitempty,ip"`
}

// LoginUserReq 用户登录请求
// @Description 用户登录请求参数
// @Tags User
// @Accept json
// @Produce json
type LoginUserReq struct {
	LoginType  string `json:"loginType" proto:"LoginType" validate:"required,oneof=name email phone"` // 登录类型: name, email, phone
	Identifier string `json:"identifier" proto:"Identifier" validate:"required"`                     // 标识符: 用户名、邮箱或手机号
	Password   string `json:"password" proto:"Password" validate:"required,min=6,max=100"`
}
